<h3 class="text-center">{{ ::vm.poll.question }}<span class="pull-right" ng-if="vm.currentUser.class >= 8"><button ng-click="vm.delete()" class="btn btn-default btn-xs"><i class="fa fa-trash-o"></i></button> <button ng-click="vm.edit()" class="btn btn-default btn-xs"><i class="fa fa-cog"></i></button>&nbsp;</span></h3>
<div ng-show="vm.poll.hasVoted || vm.onlyresult == 'true'">
	<table class="table table-striped table-hover noshadow">
		<tr ng-repeat="option in ::vm.poll.options">
			<td class="text-left" style="width: 150px">{{ option.title }}</td>
			<td class="text-left">
			<uib-progressbar animate="true" value="option.percent" type="success"><b>{{option.percent}}%</b></uib-progressbar>
			</td>
		</tr>
	</table>
	<br />
	<div class="text-center">
	<span style="text-transform: capitalize;">{{ 'SUGGEST.VOTES' | translate}}: {{ vm.poll.totalAnswers }}</span>
	<br />
	</div>
</div>
<div ng-show="!vm.poll.hasVoted && vm.onlyresult != 'true'">
	<table class="table table-striped table-hover noshadow">
		<tr ng-repeat="option in ::vm.poll.options">
			<td class="text-left" style="width: 50px;">
				<div class="radio" style="margin-left: 25px;">
					<label><input type="radio" ng-model="vm.poll.myChoise" ng-value="option.selection" /> {{ ::option.title }}</label>
				</div>
			</td>
		</tr>
		<tr>
			<td class="text-left">
				<div class="radio" style="margin-left: 25px;">
					<label><input type="radio" ng-model="vm.poll.myChoise" ng-value="255" />{{ 'POLL.BLANK_VOTE' | translate }}</label>
				</div>
			</td>
		</tr>
	</table>
	<br />
	<div class="text-center">
		<button class="btn btn-primary" ng-click="vm.vote()">{{ 'POLL.VOTE' | translate }}</button>
	</div>
</div>
<br />
<div class="text-center">
	<a ui-sref="forum.topic({id: vm.poll.topicid, forumid: 5})"><button class="btn btn-default btn-xs"><i class="fa fa-comment-o"></i> {{ 'POLL.DISCUSS' | translate }}</button></a>
	<button ng-hide="vm.onlyresult == 'true'" ui-sref="polls" class="btn btn-default btn-xs">{{ 'POLL.SHOW_OLD' | translate }}</button>
</div>
